<?php
declare (strict_types = 1);
namespace app\admin\controller;
use app\admin\logic\OrderLogic;
use think\facade\Db;
use think\facade\Request;
use think\facade\View;
//订单页
class Order{
    public function orderDetail(){
        return View::fetch();
    }
    //订单列表页
    public function orderList(){
        //where语句查询
        $where=OrderLogic::orderWhere();
        //赋值
        $data=OrderLogic::orderData();
        View::assign($data);
        //订单状态语句
        $status=\app\admin\model\Order::orderStatus();
        View::assign('status',$status);
        //全部语句
        $order=\app\admin\model\Order::orderSql($where,$data);
        $page=$order->render();
        View::assign(['order'=>$order,'page'=>$page]);

        return View::fetch();
    }



}
